package main

import "fmt"

type Person struct {
	 name string
	 age int
}

func (p *Person) printPerson()  {
	fmt.Println(" p =", *p)
}

type Student struct {
	Person	// 其变量、方法都会继承
	id int
}

func main() {
	s := Student{Person{"mike", 11}, 1}
	s.printPerson()	//  p = {mike 11}
}
